//
//  GBInterMaster_LogicLauncher.h
//  NetworkTest
//
//  Created by xiaosi on 16/7/26.
//  Copyright © 2016年 xiaosi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GCDAsyncSocket.h"
#import "GBInterMaster_Bean_UserInfo.h"
#import "GBInterMaster_Launcher.h"
#import "GBInterMaster_NetData.h"
#import "GBInterMaster_APPLogic.h"
#import "GBInterMaster_PackUtil.h"
#import "GBInterMaster_Util.h"
#import "GBInterMaster_Bean_DeviceInfo.h"
#import "GBInterMaster_DeviceLogic13001.h"


static const NSString* NOTIFICATION_REQUEST= @"com.gaobiaoiot.intermaster.request.main";

static const int PTCP_V10_VALUE_CMD_TYPE_APP_SYSTEM  = 0xA1; //app系统消息类型
static const int PTCP_V10_VALUE_CMD_TYPE_APP_DEVICE  = 0xA2; //控制设备消息类型
static const int PTCP_V10_VALUE_CMD_TYPE_SERVER_PUSH  = 0xA3; //服务器推送消息类型
static const int PTCP_V10_VALUE_CMD_TYPE_ACTION_WINDOWS =  0xF1; //本地消息类型

static const int PTCP_V10_DATA_TYPE_SELF  = 0x00;
static const int PTCP_V10_DATA_TYPE_SUB =  0x01;



 static const int LOGIC_APP_CMD_CONNREGISTER  = 0x0001;// 连接注册
 static const int LOGIC_APP_CMD_USERREGISTERVEGISTER  = 0x000E;// 新用户注册(获取校验码)
 static const int LOGIC_APP_CMD_USERREGISTER  = 0x0002;// 新用户注册
 static const int LOGIC_APP_CMD_RESETPWDVEGISTER  = 0x0011;// 忘记密码(获取校验码)
 static const int LOGIC_APP_CMD_RESETPWD  = 0x0003;// 忘记密码
 static const int LOGIC_APP_CMD_RESETPWDNEW  = 0x0012;// 忘记密码(设置新密码)
 static const int LOGIC_APP_CMD_LOGIN  = 0x0004;// 用户登录
 static const int LOGIC_APP_CMD_LOGOUT  = 0x0005;// 用户注销
 static const int LOGIC_APP_CMD_UPDATEPWD  = 0x0006;// 修改用户密码
 static const int LOGIC_APP_CMD_UPDATEINFO  = 0x0007;// 修改用户信息
 static const int LOGIC_APP_CMD_DEVICEUSERLIST  = 0x0008;// 获取使用者列表
 static const int LOGIC_APP_CMD_ADDDEVICEUSER  = 0x0009;// 添加使用者
 static const int LOGIC_APP_CMD_DELETEDEVICEUSER =  0x000A;// 删除使用者
 static const int LOGIC_APP_CMD_UPDATEDEVICEUSER =  0x000B;// 编辑使用者
 static const int LOGIC_APP_CMD_REMOVEDEVICE  = 0x000D;// 解除绑定
 static const int LOGIC_APP_CMD_DEVICEOWNCHANGE  = 0x0014;// 所有者转移
 static const int LOGIC_APP_CMD_GETDEVICELIS  = 0x000C;// 获取设备列表
 static const int LOGIC_APP_CMD_MSGRECEIVEMODEL =  0x000F;// (消息推送设置)数据同步
 static const int LOGIC_APP_CMD_UPDATEDEVICEINFO = 0x0010;// 修改设备信息
 static const int LOGIC_APP_CMD_ACCEPTPOSSESSOR =  0x0013;// 所有者认证
 static const int LOGIC_APP_CMD_GETPROGRAMINFO =  0x0015;// 获取分时段信息
 static const int LOGIC_APP_CMD_GETDEVICECONFIG  = 0x0016;// 获取设备系统配置
 static const int LOGIC_APP_CMD_GETDEVICESTATUS =  0x0017;// 获取设备最新状态
 static const int LOGIC_APP_CMD_REQUESTUSERFEEDBACK  = 0x0018;// 用户使用反馈
 static const int LOGIC_APP_CMD_GETUSEROPES  = 0x0019;// 获取用户操作记录
 static const int LOGIC_APP_CMD_GETDEVICERUNRECORD  = 0x001A;// 获取设备运行记录
 static const int LOGIC_APP_CMD_GETREPORTTEMPE =  0x001B;// 获取设备温度趋势报表
 static const int LOGIC_APP_CMD_GETDEVICEPARAM = 0x001D;//获取设备参数

 static const int LOGIC_APP_CMD_PUSH_RUNSTATE =  0x0001;// 状态上传推送
 static const int LOGIC_APP_CMD_PUSH_ADDDEVICEUSER  = 0x0002;// 添加使用者推送
 static const int LOGIC_APP_CMD_PUSH_DELETEDEVICEUSER  = 0x0003;// 删除使用者推送
 static const int LOGIC_APP_CMD_PUSH_DEVICEOWNCHANGE  = 0x0004;// 所有者转移推送
 static const int LOGIC_APP_CMD_PUSH_DAYPARTINGCHANGE  = 0x0005;// 时段设置推送推送
 static const int LOGIC_APP_CMD_PUSH_POWERSWITCH =  0x0010;// 开关机状态推送
 static const int LOGIC_APP_CMD_PUSH_WORKMODE =  0x0011;// 运行模式状态推送
 static const int LOGIC_APP_CMD_PUSH_FANMODE  = 0x0012;// 风机模式状态推送
 static const int LOGIC_APP_CMD_PUSH_FANLEVEL  = 0x0013;// 风量状态推送
 static const int LOGIC_APP_CMD_PUSH_FANHANDAUTOTAG  = 0x0014;// 风机手动auto标志状态推送
 static const int LOGIC_APP_CMD_PUSH_DEVICEWEATHERCHANGGE  = 0x0015;// 天气改变推送

 static const int LOGIC_CMD_REQUEST_RUNSTATE  = 0x0081; //
 static const int LOGIC_CMD_REQUEST_PARMSTATE  = 0x0082; //
 static const int LOGIC_CMD_REQUEST_STRAINERWARN  = 0x0083; //
 static const int LOGIC_CMD_REQUEST_DAYPARTING  = 0x0084; // 时段设置
 static const int LOGIC_CMD_REQUEST_POWERSWITCH  = 0x0085; //开关机设置
 static const int LOGIC_CMD_REQUEST_DRAUGHTFANLEVEL  = 0x0086; //
 static const int LOGIC_CMD_REQUEST_WORKMODEL  = 0x0087; // 工作模式设置
 static const int LOGIC_CMD_REQUEST_DATETIME =  0x0088; //
 static const int LOGIC_CMD_REQUEST_DATETIMESYMBOL =  0x0089; //
 static const int LOGIC_CMD_REQUEST_VALVESTATE =  0x008A; //
 static const int LOGIC_CMD_REQUEST_SY =  0x008B; //
 static const int LOGIC_CMD_REQUEST_WORKSTATE  = 0x008C; //
 static const int LOGIC_CMD_REQUEST_AIRFANMODEL  = 0x008D; //
 static const int LOGIC_CMD_REQUEST_TEMPSYMBOL  = 0x008E; //
 static const int LOGIC_CMD_REQUEST_TEMPEHM  = 0x008F; // 手动温度
 static const int LOGIC_CMD_REQUEST_TEMPEZERO =  0x0090; //
 static const int LOGIC_CMD_REQUEST_TEMPECALIBRATE =  0x0091; //
 static const int LOGIC_CMD_REQUEST_TCCT =  0x0092; //
 static const int LOGIC_CMD_REQUEST_TEMPELIMIT =  0x0093; //
 static const int LOGIC_CMD_REQUEST_MIDITYHM  = 0x0094; //
 static const int LOGIC_CMD_REQUEST_MIDITYZERO  = 0x0095; //
 static const int LOGIC_CMD_REQUEST_CO2HM  = 0x0096; //
 static const int LOGIC_CMD_REQUEST_CO2ZERO  = 0x0097; //
 static const int LOGIC_CMD_REQUEST_PM5HM  = 0x0098; //
 static const int LOGIC_CMD_REQUEST_PM5ZERO  = 0x0099; //
 static const int LOGIC_CMD_REQUEST_PM5SLOPE =  0x009A; //
 static const int LOGIC_CMD_REQUEST_VOCLBV =  0x009B; //
 static const int LOGIC_CMD_REQUEST_HTP  = 0x009C; //
 static const int LOGIC_CMD_REQUEST_LTP =  0x009D; //
 static const int LOGIC_CMD_REQUEST_CONTROLRD  = 0x009E; //
 static const int LOGIC_CMD_REQUEST_OUTAGEMODEL  = 0x009F; //
 static const int LOGIC_CMD_REQUEST_BACKLIGHT  = 0x00A0; //
 static const int LOGIC_CMD_REQUEST_485ADDRESS  = 0x00A1; //
 static const int LOGIC_CMD_REQUEST_LOCALID  = 0x00A2; //
 static const int LOGIC_CMD_REQUEST_OUTPUTDELAYTIME =  0x00A3; //
 static const int LOGIC_CMD_REQUEST_COLDHEMPEHM  = 0x00A4; //
 static const int LOGIC_CMD_REQUEST_HEATHEMPEHM  = 0x00A5; //
 static const int LOGIC_CMD_REQUEST_GUANZHI  = 0x00A6; //
 static const int LOGIC_CMD_REQUEST_BUZZERVOICE  = 0x00A7; //
 static const int LOGIC_CMD_REQUEST_ACHIEVEAIRFAN  = 0x00A8; //
 static const int LOGIC_CMD_REQUEST_LOCKSWITCH  = 0x00A9;

 static const int LOGIC_CMD_REQUEST_FANSWITCH = 0x00AA;
 static const int LOGIC_CMD_REQUEST_INTELMODEPARAM = 0x00AB;
 static const int LOGIC_CMD_REQUEST_MELTINGICEMODEPARAM = 0x00AC;
 static const int LOGIC_CMD_REQUEST_HEATMODE = 0x00B0;//加热方式设置

@class GBInterMaster_Launcher;

@interface GBInterMaster_LogicLauncher : NSObject

+ (void)launching:(NSData*) data withService:(GBInterMaster_Launcher*)service;

+ (void)launchingNetworkError:(int)codeNumber withCmdType:(int)cmdType withCmd:(int)cmd  withService:(GBInterMaster_Launcher*)service;

+ (void)appLaunching:(GBInterMaster_NetData*)netData withService:(GBInterMaster_Launcher*)service;

+ (void)deviceLaunching:(GBInterMaster_NetData*)netData withService:(GBInterMaster_Launcher*)service;

+ (void)serverLaunching:(GBInterMaster_NetData*)netData withService:(GBInterMaster_Launcher*)service;

@end
